import torch
import torch.nn as nn
# from my_conv import MyConv2d
import numpy as np
import my_ops
def test_3():
    bboxes = np.array([[100, 100, 210, 210, 0.72],
                [250, 250, 420, 420, 0.8],
                [220, 220, 320, 330, 0.92],
                [100, 100, 210, 210, 0.72],
                [230, 240, 325, 330, 0.81],
                [220, 230, 315, 340, 0.9]])
    bboxes=torch.from_numpy(bboxes)
    scores=bboxes[:,4].to(torch.float32).cuda()
    bboxes=bboxes[:,:4].to(torch.float32).cuda()
    keep=my_ops.nms_cuda(bboxes,scores,0.5,0)
    print(keep)
if __name__ == '__main__':
    test_3()
